<?php if (!$sf_user->isAuthenticated()) return; ?>

<?php echo link_to_remote(__('track plate'), array(
  'complete' => "$$('.startTracking_$plate').each(function(start){ start.hide().next().show(); });",
  'url'      => 'tracker/start?id=' . $plate,
), array('class' => "startTracking_$plate", 'style' => $tracking ? 'display:none' : '')) ?>
<?php echo link_to_remote(__('untrack plate'), array(
  'complete' => "$$('.stopTracking_$plate').each(function(stop){ stop.hide().previous().show(); });",
  'url'      => 'tracker/stop?id=' . $plate,
), array('class' => "stopTracking_$plate", 'style' => $tracking ? '' : 'display:none')) ?>
